home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / MacApp Documentation / MacApp AppleLink Messages / MacApp.Tech$ May 89 / U0049-About CleanupViews-May89 < prev    next >
Encoding:
Text File  |  1989-06-26  |  2.4 KB  |  64 lines  |  [TEXT/GEOL]

  1. Item    2889936                         23-May-89        09:44
  2.  
  3. From:   D2086                           Efficient Field Svc, C Faith, PRT
  4.  
  5. To:     MACAPP.TECH$                    MACAPP Tech
  6.  
  7. Sub:    About CleanupViews
  8.  
  9. Well,
  10.  
  11. I have finally written a script that I have been meaning to write for 10
  12. months.  The script called CleanupViews will take the results of a derez of a
  13. view file and format it removing all the /* Comments */ and substituting the
  14. correct #define symbols (systemFont, adnNone, black etc.).
  15.  
  16. It has a -s option that will save the output when finished.  It should handle
  17. all the normal views but I may have missed one, it will still work with any I
  18. may have missed except they will not be as well formatted.
  19.  
  20. WARNING:  It will really mess up a normal rez input file, i.e. .r files (won't
  21. delete anything except <returns> but that makes it real hard to read.  You
  22. should use this script on files that contain view resources only.
  23.  
  24. I generally use a derez -only 'view' command to generate the files.
  25.  
  26. Here is my Addmenus that I put in my UserStartUp•Curtis file.
  27.  
  28.     Alias DoRez  "Rez -o '{MyApp}' -a -ov
  29. '{MacApp}MacApp Resource Files:ViewTypes.r' '{MyApp}.v' > '{MyOutput}'
  30. Dev:StdOut"
  31. export DoRez
  32. Alias DoDerez "Derez '{MyApp}.rsrc' -only view '{MacApp}MacApp Resource
  33. Files:ViewTypes.r' > '{MyApp}.derez.out' ≥≥ '{MyOutput}'"
  34. export DoDerez
  35. AddMenu "MacApp" "MABuild/B" "Execute '{MyAppFolder}DoMaBuild {MyApp}' >
  36. '{MyOutput}' ≥≥ Dev:StdOut "
  37.     AddMenu "MacApp" '(-' ''
  38.     AddMenu "MacApp" "ViewEdit" "Execute {MacApp}ViewEdit"
  39.         AddMenu "MacApp" "Derez" DoDerez
  40.     AddMenu "MacApp" '(-' ''
  41.     AddMenu "MacApp" "Cleanup Views"  "CleanUpViews"
  42.     AddMenu "MacApp" "Cleanup .derez.out"  "CleanUpViews {MyApp}.derez.out"
  43.     AddMenu "MacApp" '(-' ''
  44.     AddMenu "MacApp" "Rez" DoRez
  45.     AddMenu "MacApp" "{MyApp}" {MyApp}
  46.  
  47. {MyApp} is the pathname representing my current application.
  48. {MyOutput} is the window I want all the output to go to.
  49. {MyAppFolder} is the folder where my application resides
  50. DoMABuild is a script that takes care of any special aliasing etc. before
  51. calling MABuild
  52.  
  53. If you only made changes to the MyApp.v file you can use the Rez menu item
  54. instead of a full MABuild.  It is MUCH quicker!
  55.  
  56. I hope that some of this proves useful to someone.  (you've probably already
  57. done this right?)
  58.  
  59. Curtis Faith
  60.  
  61. (P.S. If anyone has any scripting improvement suggestions link me privately)
  62.  
  63.  
  64.